package com.cljh.mapper;

import cn.hutool.core.date.DateTime;
import com.cljh.bean.Validation;
import org.apache.ibatis.annotations.*;

@Mapper
public interface ValidationMapper {
    @Insert("insert into mtmall_test.validation (email, email_code, type,time) values (#{validation.email},#{validation.emailCode},#{validation.type},#{validation.time})")
    int save(@Param("validation") Validation validation);

    @Delete("delete from mtmall_test.validation where id=#{id};")
    int delete(Integer id);

    @Select("select * from mtmall_test.validation where email =#{email} ;")
    Validation selectByEmail(@Param("email") String email);



}
